<?php
include 'connect.php';
//接收传递过来的id和标题
//$id=(int)$_POST['id'];              //id
//$state=trim($_POST['state']);       //预约状态
$id=$_GET['id'];
$state=$_GET['state'];

//修改用户的预约状态
$result=mysqli_query($link,"update reserve set state = '待处理' where id = '$id'");
//update reserve set state = '成功' where id = 67

//如果修改成功就重定向到管理员查看用户预约界面
if ($result){
    //echo '修改成功,正在返回';
    header('Location:rootreservestate.php');
}else{
    echo '失败';
}